<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>新增管理员</title>
<link rel="stylesheet" type="text/css" href="views/admin/style/css/basic.css" />
<link rel="stylesheet" type="text/css" href="views/admin/style/css/manager.css" />
<script type="text/javascript" src="views/common/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="views/common/js/artDialog4.1.6/jquery.artDialog.js?skin=idialog"></script>
<script type="text/javascript" src="views/common/js/artDialog4.1.6/plugins/iframeTools.js"></script>
<script type="text/javascript" src="views/common/js/jquery-validation/jquery.validate.js"></script>
<script type="text/javascript" src="views/common/js/jquery-validation/localization/messages_zh.js"></script>
</head>
<body>
<script type="text/javascript">
$(document).ready(function() {
    $("#update_form").validate({
        submitHandler:function(){
        var content = $("#update_form").serialize();
        $.post("?c=nav&m=updateSubmit&id=<{$oneNav[0]->id}>", content,
            function(msg){
                if(msg == 'success'){
                    art.dialog.tips('修改成功！', 1.5);
                    setTimeout(function(){
                        art.dialog.top.document.location.reload();
                    },1500);
                } else {
                    art.dialog.tips('修改失败，请稍后重试！', 1.5);
                }
            }
        );
    },
        rules: {
            nav_name: {
                required: true,
                minlength:2,
                maxlength:4,
                //remote: "?c=nav&m=isOne"
            },
            nav_info: {
                minlength:2,
                maxlength:200
            }
        },
        messages: {
            nav_name: {
                required:'导航名称不能为空',
                minlength:'导航名称不能小于2位',
                maxlength:'导航名称不能大于4位'
                //remote: "此导航已被占用"
            },
            nav_info: {
                minlength:'导航描述不能小于2位',
                maxlength:'导航描述不能大于200位'
            }
        },
    });
})
</script>
<form id="update_form" class="form">
    <div class="input_box">
        <div class="entry">
            <label for="nav_name" class="title">导航名称：</label>
            <span class="notice">*</span>
            <input type="text" name="nav_name" class="form_input" value="<{$oneNav[0]->nav_name}>"/>
        </div>
        <div class="entry">
            <span class="middle">
            <label for="nav_info" class="title">导航描述：</label>
            </span>
            <span class="notice">&nbsp;&nbsp;</span>
            <textarea class="form_input" name="nav_info" class="text"><{$oneNav[0]->nav_info}></textarea>
        </div>
    </div>
    <div style="margin-left:160px;">
        <button type="submit" class="button" name="update">修改</button>
    </div>
</form>
</body>
</html>